
         <div class="bt_dash">
                        <table class="ab_off">
                                <tr>
                                        <td>
                                                <span class="about_co"><?=$result['buildName']?>&nbsp(<?=$result['buildAddress']?>)</span><br />
                                                <a href="#"><img src="images/temp/off.jpg" alt="" /></a>
                                        </td>
                                        <td>
                                                <p><span class="sp_grey pr10"><b>Класс:</b></span>
                                                 <?
                                            switch ( $result['class'] ) {
                                                case "0":
                                                    echo "";
                                                break;

                                                case "1":
                                                    echo "A";
                                                break;

                                                case "2":
                                                    echo "A+";
                                                break;

                                                case "3":
                                                    echo "A-";
                                                break;

                                                case "4":
                                                    echo "B";
                                                break;

                                                case "5":
                                                    echo "B+";
                                                break;

                                                case "6":
                                                    echo "B-";
                                                break;

                                                case "7":
                                                    echo "C";
                                                break;

                                                case "8":
                                                    echo "C+";
                                                break;

                                                case "9":
                                                    echo "C-";
                                                break;

                                                case "10":
                                                    echo "D";
                                                break;
                                            }
                                            ?></p>
                                                <p><span class="sp_grey pr10"><b>Общ.площадь</b></span><?=$result['square']?> кв.м.</p>
                                                <ul class="more_map">
                                                        <li><a href="#" onClick="bcInDetail (<?=$idBuilding?>, '<? echo $result['id_building']?>', '<?=$result['lat']?>', '<?=$result['lng']?>', '<?=$result['buildName']?>'); return false;" class="more_icon">Подробнее</a></li>
                                                        <li><a href="#" class="map_icon" onClick="pokazat_kartu('<? echo $result['id_building']?>', '<?=$result['lat']?>', '<?=$result['lng']?>', '<?=$result['buildName']?>'); return false;">На карте</a></li>
                                                </ul>
                                        </td>
                                        <td>
                                                <a href="#" class="free_off_sp"><?
                                                
                                                $query4 = mysql_query("SELECT count( id_building ) AS col
                                                FROM building
                                                LEFT JOIN building_offices
                                                USING ( id_building )
                                                LEFT JOIN firms
                                                USING ( id_office )
                                                WHERE NOT isnull( number )
                                                AND isnull( id_firm )
                                                AND id_building = '".$result['id_building']."'");
                                            $result4 = mysql_fetch_array($query4);
                                            echo $result4['col'];
                                                ?> свободных офисов</a>
                                        </td>
                                </tr>
                        </table>
                </div><!-- .bt_dash -->
                
                <div id="frameMap_<?=$result['id_building']?>" style="display: none; width: 600px; height: 600px; padding: 1px 20px 30px 20px; margin: 20px;">
                    <div class="closeMap" id="closeMap" style="background: #fff; padding: 10px 0px 0px 20px; margin: 20px 0px 0px 500px;  width: 85px; height: 30px;" onClick="closeMap(<?=$result['id_building']?>);">
                        Закрыть
                    </div>

                    <div class="map_canvas" id="map_canvas_<?=$result['id_building']?>" style="margin: 20px auto; padding: 20px">
                    </div>
                </div>	